package com.zq.server.api.service;


import com.zq.common.core.domain.Result;
import com.zq.server.api.domain.dto.OrdersPaymentDTO;
import com.zq.server.api.domain.dto.OrdersSubmitDTO;
import com.zq.server.api.domain.vo.OrderSubmitVO;
import com.zq.server.api.domain.vo.TicketCheckVo;

import java.util.List;

/**
 * @author Super
 * @description 针对表【orders(订单表)】的数据库操作Service
 * @createDate 2024-02-26 22:35:33
 */
public interface ApiOrdersService {


    /**
     * 用户下单业务
     *
     * @param ordersSubmitDTO
     * @return OrderSubmitVO
     */
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     *
     * @param ordersPaymentDTO
     * @return
     */
    String payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;


    /**
     * 获取用户为支付的订单
     *
     * @return
     */
    List<OrderSubmitVO> getUnpaidOrders();

    /**
     * 获取用户的订单
     *
     * @return
     */
    List<OrderSubmitVO> getUserOrderList();

    /**
     * 用户验票
     *
     * @param orderNumber 订单号
     * @return 修改结果
     */
    Result updateUserTicketState(String orderNumber);

    /**
     * 获取用户所有已支付的订单
     */
    List<TicketCheckVo> getUserStayTicketCheck();

    /**
     * 用户根据手机尾号（四位）和订单id进行验票
     * @param orderId 订单id
     * @param phone 手机尾号“ 1 2 3 4  ”
     * @return 验票是否成功
     */
    Result phoneVerificationTicket(Long orderId, String phone);
}
